import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Radio from '../components/Radio'
import Select from '../components/Select'
import CheckBox from '../components/CheckBox'
import Emit from '../components/Emit'
import ConnDemo1 from '../components/use-v-model'
import Bus from '../components/Bus'
import ParentLink from '../components/ParentLink'
import ChildrenIndex from '../components/ChildrenIndex'
import Slot from '../components/Slot'
import SlotName from '../components/SlotName'
import SlotScope from '../components/SlotScope'
import SlotAccess from '../components/SlotAccess'
import CompLive from '../components/CompLive'
import CompAsync from '../components/CompAsync'
import XTemplates from '../components/XTemplates'
import NextTick from '../components/NextTick'
import NumberComp from '../components/NumberCompDemo'
import TabPageDemo from '../components/TabPageDemo'
import DropDown from '../components/DropDown'
import TableComp from '../components/TableComp'
import MessageList from '../components/MessageList'
import VueBus from '../components/VueBus'
import CollapseDemo from '../components/Collapse/CollapseDemo'
import Shopping from '../components/shopping/Shopping'
import Cart from '../components/shopping/Cart'
import Product from '../components/shopping/Product'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {path: '/radio', name: 'Radio', component: Radio},
    {path: '/select', name: 'Select', component: Select},
    {path: '/checkbox', name: 'CheckBox', component: CheckBox},
    {path: '/emit', name: 'Emit', component: Emit},
    {path: '/connDemo1', name: 'ConnDemo1', component: ConnDemo1},
    {path: '/bus', name: 'Bus', component: Bus},
    {path: '/parentLink', name: 'ParentLink', component: ParentLink},
    {path: '/childrenIndex', name: 'ChildrenIndex', component: ChildrenIndex},
    {path: '/slot', name: 'Slot', component: Slot},
    {path: '/slotName', name: 'SlotName', component: SlotName},
    {path: '/slotScope', name: 'SlotScope', component: SlotScope},
    {path: '/slotAccess', name: 'SlotAccess', component: SlotAccess},
    {path: '/liveComp', name: 'CompLive', component: CompLive},
    {path: '/compAsync', name: 'CompAsync', component: CompAsync},
    {path: '/nextTick', name: 'NextTick', component: NextTick},
    {path: '/xTemplates', name: 'XTemplates', component: XTemplates},
    {path: '/numberComp', name: 'NumberComp', component: NumberComp},
    {path: '/tabPageDemo', name: 'TabPageDemo', component: TabPageDemo},
    {path: '/dropDown', name: 'DropDown', component: DropDown},
    {path: '/tableComp', name: 'TableComp', component: TableComp},
    {path: '/messageList', name: 'MessageList', component: MessageList},
    {path: '/vueBus', name: 'VueBus', component: VueBus},
    {path: '/collapse', name: 'CollapseDemo', component: CollapseDemo},
    {
      path: '/shopping', 
      name: 'shopping', 
      component: Shopping,
      children: [
        {path: '/product', name: 'product', component: Product},
        {path: '/cart', name: 'cart', component: Cart},
      ]
    },
   
  ]
})
